﻿using System;

namespace ComparesTwoArrays
{
    class ComparesTwoArrays
    {
        static bool CompareArrays(string[] firstArray, string[] secondArray)
        {
            bool areEqual = true;
            for (int index = 0, length = firstArray.Length; index < length; index++)
            {
                if (firstArray[index] != secondArray[index])
                {
                    areEqual = false;
                }
            }
            return areEqual;
        }

        static void FillArray(string[] array)
        {
            for (int index = 0, length = array.Length; index < length; index++)
            {
                array[index] = Console.ReadLine();
            }
        }

        static void Main(string[] args)
        {
            const int Number = 5;
            string[] firstArray = new string[Number],
                secondArray = new string[Number];

            FillArray(firstArray);
            FillArray(secondArray);

            bool areEqual = CompareArrays(firstArray, secondArray);
            if (areEqual)
            {
                Console.WriteLine("The arrays are equal.");
            }
            else
            {
                Console.WriteLine("The arrays are not equal.");
            }
        }
    }
}
